﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace jQueryDotNetLib.Controls
{
    [ToolboxData("<{0}:AccordionPanel runat=server></{0}:AccordionPanel>")]
    public class AccordionPanel :System.Web.UI.WebControls.Panel
    {
        [Bindable(true)]
        [Category("Appearance")]
        [DefaultValue("")]
        [Localizable(true)]
        public string Text
        {
            get
            {
                if (ViewState["Text"] == null) return "";
                return (string)ViewState["Text"];
            }

            set
            {
                ViewState["Text"] = value;
            }
        }
        protected override void Render(HtmlTextWriter writer)
        {
            writer.Write(string.Format("<h3><a href=\"#\">{0}</a></h3><div>", this.Text));
            base.Render(writer);
            writer.Write("</div>");
        }
    }
}
